#!/usr/bin/env python3.3

soll=1000
for a in range(1,soll-1):
  for b in range(a,soll-1):
    c=soll-(a+b)
    if a*a+b*b==c*c:
      print(a*b*c)
      exit()
